#include<bits/stdc++.h>
using namespace std;
#define xyf main
#define r(i,a,b) for(int i=a;i<=b;++i)
const int maxn = 55;
int x[maxn],y[maxn],r[maxn],x1,x2,y3,y2,n,ans;
int xyf()
{
	freopen("circle.in","r",stdin);
	freopen("circle.out","w",stdout);
	cin>>n;
	r(i,1,n)cin>>x[i];
	r(i,1,n)cin>>y[i];
	r(i,1,n)cin>>r[i];
	cin>>x1>>y3>>x2>>y2;
	r(i,1,n)
	{
		if(((x1-x[i])*(x1-x[i])+(y3-y[i])*(y3-y[i])>r[i]*r[i])&&(x2-x[i])*(x2-x[i])+(y2-y[i])*(y2-y[i])<r[i]*r[i])
			ans++;
		if(((x1-x[i])*(x1-x[i])+(y3-y[i])*(y3-y[i])<r[i]*r[i])&&(x2-x[i])*(x2-x[i])+(y2-y[i])*(y2-y[i])>r[i]*r[i])
			ans++;
	}
	cout<<ans<<endl;
	return 0;
}
